import { post } from '@/utils/request'

/**
 * 题库详情
 * @param data
 */
export function fetchDetail(data) {
  return post('/api/repo/detail', data)
}

/**
 * 保存题库
 * @param data
 */
export function saveData(data) {
  return post('/api/repo/save', data)
}

/**
 * 保存题库
 * @param data
 */
export function fetchList(data) {
  return post('/api/repo/paging', data)
}

/**
 * 创建预付费订单
 * @param repoId
 * @returns {Promise}
 */
export function buy(repoId) {
  return post('/api/repo/buy/init', { repoId: repoId })
}
